package com.android.aircondition.activity;

import android.os.Bundle;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;

import com.android.aircondition.R;
import com.android.aircondition.view.RangeSeekBar;
import com.android.aircondition.view.RangeSeekBar.OnRangeSeekBarChangeListener;

/**
 * 扫风
 * 
 * @author zhoucong
 * 
 */
public class ClearAirActivity extends BaseActivity {
	SeekBar seekBar1;
	RangeSeekBar<Integer> seekBar2;
	RelativeLayout seek2;

	@Override
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.clear);
		super.setCommonTitle(this, R.string.title_clear);
		seekBar1 =(SeekBar)findViewById(R.id.seek_updown);
//		Matrix m = new Matrix();
//		m.postRotate(90);
//		seekBar1.setImageMatrix(m);
////		seek1 = (RelativeLayout) findViewById(R.id.seekbg1);
//		RelativeLayout.LayoutParams lp1 = new android.widget.RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);	
//		lp1.setMargins(80, 20, 120, 20);
//		seek1.addView(seekBar1, lp1);
		seek2 = (RelativeLayout) findViewById(R.id.seekbg2);
		seekBar2 = new RangeSeekBar<Integer>(100, 100, this,false);
		RelativeLayout.LayoutParams lp2 = new android.widget.RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);	
		lp2.setMargins(60, 60, 60, 60);
		seek2.addView(seekBar2, lp2);
		
	
		seekBar1.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
			
			@Override
			public void onStopTrackingTouch(SeekBar seekBar) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void onStartTrackingTouch(SeekBar seekBar) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void onProgressChanged(SeekBar seekBar, int progress,
					boolean fromUser) {
				// TODO Auto-generated method stub
				
			}
		});
		seekBar2.setOnRangeSeekBarChangeListener(new OnRangeSeekBarChangeListener<Integer>() {

			@Override
			public void onRangeSeekBarValuesChanged(RangeSeekBar<?> bar,
					Integer minValue, Integer maxValue) {
				// TODO Auto-generated method stub

			}
		});

	}

}
